<?php

namespace app\api\controller;

use app\api\service\BalanceRechargeService;
use app\ApiController;

class BalanceController extends ApiController
{
    /**
     * 余额充值
     */
    public function recharge()
    {
        $param = request()->post();
        $param['platform'] = isset(request()->header()['x-csrf-token']) ? request()->header()['x-csrf-token'] : '';
        $balanceRechargeService = new BalanceRechargeService();
        return sparkSuccess($balanceRechargeService->createOrder($param));
    }
}
